<div id="window" :class="(box.name === false)?'':'window'">
  <i class="bg-i" @click="close"></i>
  <div class="login-register" :class="box.name">
    <i class="icon MS-icon-cancel-circle" @click="close"></i>
    <div class="logo">M</div>
    <div class="des">
      高效利用闲置物品
      <br/>
      校园二手物品尽在此站
      <br/>
      联系物品主人，购买闲置物品
      <br/>
      将您闲置的物品出售给需要的人
    </div>
    <div class="from-main login">
      <i class="icon MS-icon-user" :class="success_account?'active':''"></i>
      <input placeholder="帐号(邮箱)" type="email" v-model="userAccount" :class="success_account?'active':''"/>

      <i class="icon MS-icon-lock" :class="success_password?'active':''"></i>
      <input @keyup.13="login" placeholder="密码(6位~20位)" type="password" v-model="userPassword" :class="success_password?'active':''"/>

      <div @click="login" class="btn submit" :class="success_password&&success_account?'active':''">立即登录</div>
      <div class="btn other-account">
        <ul>
          <li>暂未开放此项功能，敬请期待!</li>
        </ul>
        社交账号登录
      </div>
      <div class="go-other" @click="box.name='register'">先去注册</div>
    </div>
    <div class="from-main register">
      <i class="icon MS-icon-user" :class="success_account?'active':''"></i>
      <input placeholder="帐号(邮箱)" type="email" v-model="userAccount" :class="success_account?'active':''"/>

      <i class="icon MS-icon-hipster" :class="success_name?'active':''"></i>
      <input placeholder="昵称(长度2~6)" type="text" v-model="userName" :class="success_name?'active':''"/>

      <i class="icon MS-icon-lock" :class="success_password?'active':''"></i>
      <input placeholder="密码(长度6~20)" type="password"  v-model="userPassword" :class="success_password?'active':''"/>

      <i class="icon MS-icon-lock" :class="success_password2?'active':''"></i>
      <input @keyup.13="register" placeholder="确认密码" type="password"  v-model="userPassword2" :class="success_password2?'active':''"/>

      <div @click="register" class="btn submit" :class="success_password&&success_name&&success_password2&&success_account?'active':''">立即注册</div>
      <div class="btn other-account">
        <ul>
          <li>暂未开放此项功能，敬请期待!</li>
        </ul>
        社交账号注册
      </div>
      <div class="go-other" @click="box.name='login'">已有帐号,马上登录</div>
    </div>
  </div>
  <img class="show-pic" :class="box.name" :src="box.name==='showPic'?box.data:''" @click="close"/>
  <div class="dialog-alert" :class="box.name" v-text="box.data"></div>
  <div class="dialog-input" :class="box.name">
    <span class="text" v-text="box.data"></span><input :placeholder="box.placeholder" v-model="box.val" :type="box.type"/>
    <i class="icon MS-icon-check" @click="inputSubmit"></i>
    <i class="icon MS-icon-close" @click="close"></i>
  </div>
</div>